{include file="admin/header.tpl" title="header" }


<div id="content">
      {php} echo display_msg(); {/php}
      
      <h2>Trivia <!--<div style="float:right"> <h5> <a href="{$baseurl}/admin/trivia.php?action=view_report">View Report</a> </h5> </div>--> </h2>
      
       <div class="lstable">
       <form action="{$baseurl}/admin/trivia.php" name="" method="post">
      
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="15%" align="left" valign="middle"><strong>Trivia Question :</strong></td>
            <td width="20%" align="left" valign="middle"><input type="text" name="question" value="{$post.question}"  /></td>
            <td width="65%">&nbsp;</td>
          </tr>
           <tr>
            <td align="left" valign="middle">&nbsp;</td>
            <td align="left" valign="middle">
            	<input type="submit"  class="btncss" name="submit" class="btnSearch" value="Search" /> &nbsp;
                <input class="btncss" type="button" onclick="location.href='{$baseurl}/admin/trivia.php'" value="Reset" />
               </td>
          </tr>
        </table>
        </form>
      </div>
       <div><img src="{$admin_imgurl}/spacer.gif" width="1" height="25" alt="spacer" /></div>
      
      <div>
      	<div class="admorep" align="right">
         	<a href="{$baseurl}/admin/trivia.php?action=add">Add More Trivia</a>
            </div>
          <form action="{$baseurl}/admin/poll.php" name="menu_list_form" id="menu_list_form" method="post">
       		<input type="hidden" name="action" value="update_order"  />
        <table cellspacing="0" cellpadding="0" class="engineTable">
          <thead>
            <tr >
              <th width="8%" align="center" valign="top">Sr.No</th>
              <th width="60%" align="left" valign="top">Question</th>
              <!--<th width="12%" align="left" valign="top">Featured</th>-->
              <th width="32%" align="center" valign="top" colspan="3">Actions</th>
             
            </tr>
          </thead>
          <tbody>
          {assign var='counter' value=$pagination_start}
       	{foreach from=$trivia item=row}
            {assign var='counter' value=$counter+1}     
            <tr class="{cycle values="even,odd"}">
              <td align="center" valign="top">{$counter}</td>
              
              
              <td align="left" valign="top">{$row.question}</td>
              
                <td align="center" valign="top">
                    {if $row.active eq 1}	          
                    <a title="Deactivate" href="{$baseurl}/admin/trivia.php?action=changeStatus&status=0&question_id={$row.question_id}&{$search_var}"> <img src="{$admin_imgurl}/active.png"/> </a>
                    {else}
                    <a title="Activate" href="{$baseurl}/admin/trivia.php?action=changeStatus&status=1&question_id={$row.question_id}&{$search_var}"> <img src="{$admin_imgurl}/deactive.png"/> </a>
                    {/if}
              
              </td>
              
              <td align="center"> <a title="View" href="{$baseurl}/admin/trivia.php?action=edit&question_id={$row.question_id}&pg={$post.pg}&ipp={$post.ipp}&new_page_limit={$post.new_page_limit}&poll_question={$post.poll_question}"><img src="{$admin_imgurl}/edit.png"  /> </a> </td>
              <td align="center"><a title="Delete" href="{$baseurl}/admin/trivia.php?action=delete&question_id={$row.question_id}" onClick="return confirm('Are You Sure To Delete?')"><img src="{$admin_imgurl}/del.png"  /> </a></td>
              
            </tr>
        {foreachelse}
           <tr><td colspan="9" align="center"> No Record Found </td></tr>
        {/foreach}
            
          </tbody>
        </table>
        </form>
        <div class="pagination tn"> 
        	<div class="page_limit_div">
        		 {$page_limit_select}
	        </div>
        {$pagination}
          <div class="totalno"><strong>Total Records:</strong> {$total_records}</div>
          <div class="clear"></div>
        </div>
      </div>
    </div>
    
     {include file="admin/footer.tpl" title="footer"}   